"""
# -*- coding: utf-8 -*-
Time    : 2025/7/24 下午3:28
Author  : Micah
File    : test_minfixture.py
Function:
"""

import pytest


@pytest.fixture(scope="module", params=['mod1', 'mod2'])
def modargs(request):
    param = request.param
    print("\nsetup module args:", param)
    yield param
    print("\nteardown module args:", param)


@pytest.fixture(scope="function", params=[1, 2])
def otherargs(request):
    param = request.param
    print("\nsetup other args:", param)
    yield param
    print("\nteardown other args:", param)


def test_0(otherargs):
    print("\ntest_0:", otherargs)


def test_1(modargs):
    print("\ntest_1:", modargs)


def test_2(modargs, otherargs):
    print("\ntest_2:modargs:{},and otherargs:{}".format(modargs, otherargs))
